<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2019/7/23
 * Time: 13:38
 */

namespace app\index\controller;


use app\common\model\QueueModel;
use app\common\model\UrlLogsModel;
use think\response\Xml;

class Test
{
    public function push(){
        $queueModel = new QueueModel();
        $i = 18205921385;
        while($i<18205921485){
            $ret = $queueModel->push('sms',  $i);
            echo $i.'入队列<br>';
            $i+=  $i;
        }

    }

    public function consume(){
        $queueModel = new QueueModel();
        $mobile = $queueModel->consume('sms');
        if(!empty($mobile)){
            echo $mobile.'出队列<br>';
            $this->consume();
        }
        echo 'finish';
    }


}